home *** CD-ROM | disk | FTP | other *** search
- on prevSB
- global gSBState
- if the timer < 20 then
- exit
- end if
- set curRecord to item 1 of gSBState
- if curRecord = 1 then
- set curRecord to value(item 2 of gSBState)
- else
- set curRecord to curRecord - 1
- end if
- updateSB(curRecord)
- startMouse()
- end
-
- on nextSB
- global gSBState
- set curRecord to item 1 of gSBState
- if curRecord >= value(item 2 of gSBState) then
- set curRecord to 1
- else
- set curRecord to curRecord + 1
- end if
- updateSB(curRecord)
- startMouse()
- end
-
- on updateSB curRecord
- global gSBState, gResourcePath
- set curRecord to value(curRecord)
- put curRecord into item 1 of gSBState
- debug("R: " & curRecord)
- set sbTxtHdr to field "SBTXT_0"
- set numChunks to line 1 of sbTxtHdr
- delete line 1 of sbTxtHdr
- repeat with z = 1 to the number of lines in sbTxtHdr
- set sRec to word 1 of line z of sbTxtHdr
- set eRec to word 2 of line z of sbTxtHdr
- if (curRecord >= sRec) and (curRecord <= eRec) then
- exit repeat
- end if
- end repeat
- set theLine to curRecord - sRec + 1
- set theData to line theLine of field ("SBTXT_" & z)
- set backMsg to "showSBs " & value(item 1 of gSBState)
- set the itemDelimiter to "|"
- set theFrame to item 1 of theData
- set theMovLinks to putBackChars(item 6 of theData)
- set theStillLinks to putBackChars(item 7 of theData)
- set the movieTime of sprite 31 to theFrame * 60
- updateLinkIcons(backMsg, EMPTY, theStillLinks, theMovLinks, 0, 0)
- put item 4 of theData & " " & item 8 of theData into field "SB_Name"
- put putBackChars(item 5 of theData) into field "SB_Caption"
- set the itemDelimiter to ","
- updateStage()
- set the visible of sprite 31 to 1
- updateStage()
- set the movieTime of sprite 31 to theFrame * 60
- set the visible of sprite 31 to 1
- updateStage()
- end
-
- on sbClick sN
- if voidp(sN) then
- set sN to the clickOn
- end if
- spinCursor()
- hiliteAnim(sN, EMPTY)
- set the visible of sprite 31 to 0
- showSBs(line sN - 5 of field "SBTXT_PD")
- end
-
- on showSBs theNum
- global gOnPC
- spinCursor()
- if (theNum = EMPTY) or voidp(theNum) then
- set theNum to 1
- end if
- if gOnPC then
- pause()
- end if
- set the visible of sprite 31 to 0
- put " " into field "SB_Name"
- put " " into field "SB_Caption"
- LinkTo("SB BG")
- updateSB(theNum)
- continue()
- updateStage()
- resetCursor()
- end
-
- on sbSlideShow
- global gSlideDelay
- stopCursor()
- set continue to 1
- set firstClick to the clickLoc
- repeat while continue
- nextSB()
- idle()
- set theDelay to 60 * integer(gSlideDelay)
- if theDelay < 60 then
- set theDelay to 60
- end if
- repeat with z = 1 to theDelay
- wait(1)
- if (the mouseDown = 1) or (the clickLoc <> firstClick) then
- set continue to 0
- exit repeat
- end if
- end repeat
- if continue <> 1 then
- exit repeat
- end if
- updateStage()
- idle()
- end repeat
- resetCursor()
- startMouse()
- end
-